<?php

require_once "core/application/models/mchangelogin/mchangelogin3.php";

class Mchangelogin4 extends Mchangelogin3 {

    private $_query;

    protected function setNewLoginInAccountData($newLogin) {
        /**
         *  обновление логина
         * @param string $newLogin
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "UPDATE `account_data` SET `name` = '$newLogin' WHERE `name` = '$_SESSION[name]'";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
